package cn.base.day06;

/**
 * 数组反转
 */
public class Test05 {
    public static void main(String[] args) {
        int[] arr = {30, 50, 33, 17, 29, 18};
        for (int i = 0; i < arr.length; i++) {
            if (i < arr.length - i - 1) {
                int temp = arr[i];
                arr[i] = arr[arr.length - i - 1];
                arr[arr.length - i - 1] = temp;
            }
        }
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i] + " ");
        }

    }
}
